package cn.edu.njnu.controller;

import cn.edu.njnu.pojo.Result;
import cn.edu.njnu.service.IllustrationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/e-resource/api")
@Validated
public class IllustrationController extends BaseController{
    @Autowired
    private IllustrationService illustrationService;
    @GetMapping("/v1.0/public/illustration")
    public Result getIllustration(@RequestParam(name = "keywords") String keywords){
        return illustrationService.getIllustration(keywords);
    }
}
